/*
 * Copyright (c) 2020-2021. the original authors and DEPSEA.ORG
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.depsea.oss.client;

import lombok.Getter;
import org.depsea.oss.client.aliyun.AliyunCustomerBucketOssTemplate;
import org.depsea.oss.client.aliyun.AliyunOssTemplate;
import org.depsea.oss.client.aliyun.AliyunPresignedUrlGenerator;
import org.depsea.oss.client.minio.MinioCustomerBucketOssTemplate;
import org.depsea.oss.client.minio.MinioOssTemplate;
import org.depsea.oss.client.minio.MinioPresignedUrlGenerator;

/**
 * Oss 类型
 *
 * @author Wang Chengwei
 * @since 1.0.0 2021/12/2 14:23
 */
@Getter
public enum OssType {

    /**
     * Minio
     */
    MINIO(MinioOssTemplate.class, MinioCustomerBucketOssTemplate.class, MinioPresignedUrlGenerator.class),
    ALIYUN(AliyunOssTemplate.class, AliyunCustomerBucketOssTemplate.class, AliyunPresignedUrlGenerator.class),
    ;

    private final Class<? extends OssTemplate> ossTemplateClass;

    private final Class<? extends CustomerBucketOssTemplate> customerBucketOssTemplateClass;

    private final Class<? extends PresignedUrlGenerator> presignedUrlGeneratorClass;

    OssType(Class<? extends OssTemplate> ossTemplateClass,
            Class<? extends CustomerBucketOssTemplate> customerBucketOssTemplateClass,
            Class<? extends PresignedUrlGenerator> presignedUrlGeneratorClass) {
        this.ossTemplateClass = ossTemplateClass;
        this.customerBucketOssTemplateClass = customerBucketOssTemplateClass;
        this.presignedUrlGeneratorClass = presignedUrlGeneratorClass;
    }
}
